home *** CD-ROM | disk | FTP | other *** search
/ Champak 29 / Volume 29 - JOGO DISK .iso / Games / jungle_adventure.swf / scripts / __Packages / GameHealth.as < prev    next >
Text File  |  2006-11-29  |  893b  |  32 lines

  1. class GameHealth extends GameCollectable
  2. {
  3.    var assetID = "health";
  4.    var soundID = "health";
  5.    var value = 0.5;
  6.    var classID = SSGlobal.CLSID_HEALTH;
  7.    var editor_isItem = true;
  8.    var editor_name = "GameHealth";
  9.    var editor_args_names = ["value"];
  10.    var editor_args_values = [GameHealth.prototype.value];
  11.    var editor_args_types = ["number"];
  12.    var editor_args_options = [[0,1,0.01]];
  13.    var editor_args_descriptions = [""];
  14.    var editor_args_mode = [0];
  15.    var editor_args_component = ["NumericStepper"];
  16.    function GameHealth(value)
  17.    {
  18.       super();
  19.       if(typeof value != "string" && value != null)
  20.       {
  21.          this.value = value;
  22.       }
  23.    }
  24.    function setCollected(obj)
  25.    {
  26.       this.collected = true;
  27.       obj.shiftHealth(this.value,this);
  28.       GameSound.playSound(this.soundID);
  29.       this.world.removeObject(this);
  30.    }
  31. }
  32.